home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-08 | 3.5 KB | 118 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: DrwDDCmd.h
- // Release Version: $ 1.0d11 $
- //
- // Author: Mary Boetcher
- //
- // Copyright: © 1993, 1995 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef DRWDDCMD_H
- #define DRWDDCMD_H
-
- // ----- FrameWork Includes -----
-
- #ifndef FWDRCMD_H
- #include "FWDrCmd.h"
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export on
- #endif
- class FW_CLASS_ATTR ODDragItemIterator;
- class FW_CLASS_ATTR FW_CFrame;
- class FW_CLASS_ATTR FW_CPrivOrderedCollection;
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export off
- #endif
-
- class FW_CLASS_ATTR CDrawPart;
- class FW_CLASS_ATTR CDrawSelection;
- class FW_CLASS_ATTR CDrawSubscribeLink;
- class FW_CLASS_ATTR CDrawLinkManager;
-
- //========================================================================================
- // class CDragCommand - for dragging
- //========================================================================================
-
- class FW_CLASS_ATTR CDragCommand : public FW_CDragCommand
- {
- public:
-
- CDragCommand(Environment* ev,
- CDrawPart* part,
- FW_CFrame* frame,
- CDrawSelection* selection,
- FW_Boolean canUndo);
-
- virtual ~ CDragCommand();
-
- // --- FW_CCommand overrides
- virtual void UndoIt(Environment* ev); // Override
- virtual void RedoIt(Environment* ev); // Override
- virtual void SaveUndoState(Environment* ev); // Override
- virtual void FreeUndoState(Environment *ev); // Override
-
- protected:
- CDrawPart* fDrawPart;
- CDrawSelection* fDrawSelection;
- FW_CPrivOrderedCollection* fClearedShapeList;
-
- void SelectDraggedShapes(Environment* ev);
- };
-
- //========================================================================================
- // class CDropCommand - for dropping
- //========================================================================================
-
- class FW_CLASS_ATTR CDropCommand : public FW_CDropCommand
- {
- public:
- CDropCommand(Environment* ev,
- CDrawPart* itsPart,
- FW_CFrame* frame,
- ODDragItemIterator* dropInfo,
- ODFacet* facet,
- const FW_CPoint& windowPoint,
- FW_Boolean canUndo);
-
- virtual ~ CDropCommand();
-
- virtual void UndoIt(Environment* ev); // Override
- virtual void RedoIt(Environment* ev); // Override
- virtual void CommitUndone(Environment *ev); // Override
- virtual void SaveRedoState(Environment* ev); // Override
- virtual void FreeRedoState(Environment* ev); // Override
-
- // --- FW_CDropCommand overrides
- virtual FW_Boolean DoDrop(Environment* ev, ODStorageUnit* dropSU, const FW_CPoint& originPoint, const FW_CPoint& dropPoint, FW_Boolean isDropMove);
- virtual FW_Boolean DoDroppedInSameFrame(Environment* ev, ODStorageUnit* dropSU, const FW_CPoint& originPoint, const FW_CPoint& dropPoint);
- virtual void DoDroppedPasteAs(Environment* ev,
- const FW_CPoint& originPoint,
- const FW_CPoint& dropPoint); // Override
-
- protected:
-
- void OffsetSelection(Environment* ev, const FW_CPoint& delta);
- void RestoreDroppedShapes(Environment* ev);
- void SelectDroppedShapes(Environment* ev);
-
- CDrawLinkManager* GetDrawLinkManager(Environment* ev) const;
-
- private:
- CDrawPart* fDrawPart;
- CDrawSelection* fDrawSelection;
- FW_CPoint fDropDelta;
- FW_CPrivOrderedCollection* fDroppedShapeList;
- CDrawSubscribeLink* fSavedLink;
- };
-
-
- #endif
-